package com.weipai.springboot.module.service.impl;

import com.weipai.springboot.model.WxPay;
import com.weipai.springboot.model.api.Response;
import com.weipai.springboot.module.dao.WxPayDao;
import com.weipai.springboot.module.service.WxPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

/**
 * @author gyt
 * @date 2017-10-30 13:30
 */
@Service
public class WxPayServiceImpl implements WxPayService {
    
    @Autowired
    private WxPayDao wxPayDao;

    //请求XML
    public String getRequestXml(Map<Object,Object> parameters){
        return wxPayDao.getRequestXml(parameters);
    }
    
    //获取统一下单接口返回数据
    public Response wxPayReturn(String s, WxPay wp){
        return wxPayDao.wxPayReturn(s, wp);
    }
    
    //访问微信
    public String httpsRequest(String requestUrl, String requestMethod, String outputStr) {
        return wxPayDao.httpsRequest(requestUrl, requestMethod, outputStr);
    }

    @Override
    public boolean withdrawals(String alipayName, String rrNumber, String money, String type) {
        return wxPayDao.withdrawals(alipayName, rrNumber, money, type);
    }


}
